Skip to content

Fix ChatGPT send detection for current Android UI - #7

Open
koreazombie wants to merge 1 commit into
ctech1313:mainfrom
koreazombie:agent/fix-chatgpt-send-detection
Open

Fix ChatGPT send detection for current Android UI#7
koreazombie wants to merge 1 commit into
ctech1313:mainfrom
koreazombie:agent/fix-chatgpt-send-detection

Conversation

@koreazombie

@koreazombie koreazombie commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • recognize the current ChatGPT Android Send semantics, including Send prompt and Korean labels
  • inspect accessibility action labels in addition to content descriptions and view IDs
  • allow an exact semantic label on a non-clickable icon child while activating its clickable ancestor
  • search a slightly deeper composer ancestor scope for modern Compose/React Native hierarchies

Root cause

On a Galaxy Z Fold8 with the current ChatGPT Android app, Enter reached the accessibility service and the focused editable composer was found, but findSendButtonNearComposer returned Absent. The current UI no longer exposes the Send control in only the shapes accepted by the existing matcher: the exact semantic identity can use Send prompt, a localized label, an accessibility action label, or a nested icon node separated from the clickable ancestor.

The matcher still requires an enabled supported app, exactly one focused editable composer, and exactly one visible, enabled Send target near that composer. It continues to fail open when the target is missing or ambiguous and does not inspect message text.

Fixes #6.

Validation

  • ./gradlew clean testDebugUnitTest lintDebug assembleDebug
  • physical-device verification on Galaxy Z Fold8 with a Bluetooth hardware keyboard and the latest ChatGPT Android app available on 2026-08-13
  • before: Enter inserted a newline and diagnostics reported semantic Send button not found nearby
  • after: Enter successfully activated Send

Summary by CodeRabbit

  • New Features

    • Improved send-button detection across supported apps, including labels exposed through accessibility actions.
    • ChatGPT send controls now recognize additional English and Korean labels.
  • Bug Fixes

    • Improved reliability when the send label appears on a non-clickable child element.
    • Prevented “Resend prompt” from being incorrectly identified as a send action.
    • Increased detection coverage for deeply nested composer layouts.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fe7c5464-7dbe-42af-9fcf-5566b52c990a

📥 Commits

Reviewing files that changed from the base of the PR and between cb62b92 and 2aff556.

📒 Files selected for processing (3)
  • app/src/main/java/com/ctech/enter2send/ChatGptKeyAccessibilityService.kt
  • app/src/main/java/com/ctech/enter2send/SupportedAppProfile.kt
  • app/src/test/java/com/ctech/enter2send/SupportedAppProfilesTest.kt

📝 Walkthrough

Walkthrough

Send-target detection now recognizes accessibility action labels and localized ChatGPT send labels. The accessibility service accepts semantic child nodes and searches up to eight composer ancestors for the clickable target. Tests cover localized labels, negative matches, and action-label-only matching.

Changes

ChatGPT send-target detection

Layer / File(s) Summary
Send identity matching and validation
app/src/main/java/com/ctech/enter2send/SupportedAppProfile.kt, app/src/test/java/com/ctech/enter2send/SupportedAppProfilesTest.kt
hasSendIdentity matches content descriptions or action labels. ChatGPT supports Send prompt and Korean send labels. Tests cover accepted labels, Resend prompt, and null accessibility text.
Accessibility target resolution
app/src/main/java/com/ctech/enter2send/ChatGptKeyAccessibilityService.kt
Send detection passes action labels, accepts eligible semantic child nodes, and searches up to eight composer ancestors for the clickable target.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: 🔵 Low · up to 2aff5

The change improves Send detection across current ChatGPT UI variants, but broader matching could activate an unrelated nearby control in an ambiguous accessibility hierarchy. The PR is mergeable with explicit owner awareness and follow-up validation that ambiguous layouts fail open.

Possibly related PRs

  • ctech1313/Enter2Send#2: Both changes update ChatGPT send-target detection, including accessibility identity matching.

Suggested reviewers: ctech1313

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: fixing ChatGPT send detection for the current Android UI.
Linked Issues check ✅ Passed The changes address issue #6 by detecting current ChatGPT send semantics and activating clickable ancestors for non-clickable semantic nodes.
Out of Scope Changes check ✅ Passed The code and tests remain focused on ChatGPT send-target detection and the behavior required by issue #6.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@koreazombie
koreazombie marked this pull request as ready for review August 12, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enter2Send does not send on Galaxy Z Fold8 with latest ChatGPT Android app

1 participant